<?php
class Default_Service_Warehouse
{

	public static function getByCondition($condition=array(),$type='*',$order='warehouse_id', $pageSize=0, $page=1)
	{
		$obj=new Default_Model_Warehouse();
		$rows= $obj->getByCondition( $condition,$type,$order, $pageSize,$page);
		return $rows;
	}

	public static function getByfield($field,$value)
	{
		$obj=new Default_Model_Warehouse();
		$rows=$obj->getByfield($field,$value);
		if(!empty($rows)){
			$rows=$rows->toArray();
		}
		return $rows;
	}


	public static function getById($t_id)
	{
		$obj=new Default_Model_Warehouse();
		$rows=$obj->getById($t_id);
		if(!empty($rows)){
			$rows=$rows->toArray();
		}
		return $rows;
	}

	public static function create($row)
	{
		$obj=new Default_Model_Warehouse();
		return $obj->create($row);
	}

	public static function update($row,$t_id)
	{
		$obj=new Default_Model_Warehouse();
		return $obj->update($row,$t_id);
	}

	public static function delete($id)
	{
		$obj=new Default_Model_Warehouse();
		return $obj->delete($id);
	}

}